# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.NetworkManagement.V1beta1.Model.ProxyConnectionInfo do
  @moduledoc """
  For display only. Metadata associated with ProxyConnection.

  ## Attributes

  *   `networkUri` (*type:* `String.t`, *default:* `nil`) - URI of the network where connection is proxied.
  *   `newDestinationIp` (*type:* `String.t`, *default:* `nil`) - Destination IP address of a new connection.
  *   `newDestinationPort` (*type:* `integer()`, *default:* `nil`) - Destination port of a new connection. Only valid when protocol is TCP or UDP.
  *   `newSourceIp` (*type:* `String.t`, *default:* `nil`) - Source IP address of a new connection.
  *   `newSourcePort` (*type:* `integer()`, *default:* `nil`) - Source port of a new connection. Only valid when protocol is TCP or UDP.
  *   `oldDestinationIp` (*type:* `String.t`, *default:* `nil`) - Destination IP address of an original connection
  *   `oldDestinationPort` (*type:* `integer()`, *default:* `nil`) - Destination port of an original connection. Only valid when protocol is TCP or UDP.
  *   `oldSourceIp` (*type:* `String.t`, *default:* `nil`) - Source IP address of an original connection.
  *   `oldSourcePort` (*type:* `integer()`, *default:* `nil`) - Source port of an original connection. Only valid when protocol is TCP or UDP.
  *   `protocol` (*type:* `String.t`, *default:* `nil`) - IP protocol in string format, for example: "TCP", "UDP", "ICMP".
  *   `subnetUri` (*type:* `String.t`, *default:* `nil`) - Uri of proxy subnet.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :networkUri => String.t() | nil,
          :newDestinationIp => String.t() | nil,
          :newDestinationPort => integer() | nil,
          :newSourceIp => String.t() | nil,
          :newSourcePort => integer() | nil,
          :oldDestinationIp => String.t() | nil,
          :oldDestinationPort => integer() | nil,
          :oldSourceIp => String.t() | nil,
          :oldSourcePort => integer() | nil,
          :protocol => String.t() | nil,
          :subnetUri => String.t() | nil
        }

  field(:networkUri)
  field(:newDestinationIp)
  field(:newDestinationPort)
  field(:newSourceIp)
  field(:newSourcePort)
  field(:oldDestinationIp)
  field(:oldDestinationPort)
  field(:oldSourceIp)
  field(:oldSourcePort)
  field(:protocol)
  field(:subnetUri)
end

defimpl Poison.Decoder, for: GoogleApi.NetworkManagement.V1beta1.Model.ProxyConnectionInfo do
  def decode(value, options) do
    GoogleApi.NetworkManagement.V1beta1.Model.ProxyConnectionInfo.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.NetworkManagement.V1beta1.Model.ProxyConnectionInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
